make_windows_release.ps1 now can be used with MinGW or MSVC. It is likely we will have to switch compilers with Qt >= 5.6 because MinGW is not supported with webengine, and Qt >= 5.6 release packages from www.qt.io distributes webengine and not webkit (although some other parties build webkit from source with these versions of Qt).
appveyor.yml is modified to run a release on one MinGW case (Qt 5.5, webkit) and one MSVC case (Qt 5.6, webengine, 32 bit). In the case of MSVC the VC redistributible installer is run by setup.
Note that inno setup compiler is always run in 32 bit mode, so if you use this with 64 bit executables they will install in the wrong place, i.e. "Program Files (x86)"
platform: mingw
qt: 5.6\mingw49_32
tools: mingw492_32
- # MinGW
- # - name: win32
- # platform: mingw
- # qt: 5.9\mingw53_32
- # tools: mingw530_32
# MSVC x32
- name: win32
platform: x86
# Flesh out with amd64/msvc cases later.
build_script:
- ps: |
+ # be aware that vcvarsall will reset platform amd64 to X64!
+ echo "platform: $env:platform"
+ echo "qt: $env:qt"
+ qmake -query
+ Get-Location
if (($env:platform -eq "mingw") -and ($env:qt -eq "5.5\mingw492_32"))
{
- Get-Location
- qmake -query
- & ".\tools\make_windows_release.ps1"
+ # windeployqt in 5.5.1 suffers from bug
+ # https://bugreports.qt.io/browser/QTBUG-48946
+ # which trashes the translations. Work around
+ # by using the next version of windeployqt which had this
+ # bug fixed.
+ & ".\tools\make_windows_release.ps1" -windeployqt "C:\Qt\5.6\mingw49_32\bin\windeployqt.exe"
+ $sha=(git rev-parse --short HEAD)
+ Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Setup.exe" }
+ Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Manifest.txt" }
+ }
+ elseif (($env:platform -eq "x86") -and ($env:qt -eq "5.6\msvc2015"))
+ {
+ & ".\tools\make_windows_release.ps1" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_6_MSVC2015_32bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_6_MSVC2015_32bit-Release" -mkspec win32-msvc2015 -mkcmd nmake.exe
$sha=(git rev-parse --short HEAD)
Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Setup.exe" }
Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Manifest.txt" }
win32 {
TARGET=GPSBabelFE
+}
+win32-g++ {
QMAKE_LFLAGS_RELEASE += -static-libgcc
}
unix:TARGET=gpsbabelfe-bin
; Uses the Inno setup compiler.\r
; windeployqt should be run to prepare the necessary Qt files before\r
; running Inno Setup.\r
+#ifndef gui_build_dir_name\r
+ #define gui_build_dir_name "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+#endif\r
+#ifndef gpsbabel_build_dir_name\r
+ #define gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+#endif\r
\r
[Setup]\r
; NOTE: The value of AppId uniquely identifies this application.\r
Source: gmapbase.html; DestDir: "{app}"; Flags: ignoreversion\r
Source: qt.conf; DestDir: "{app}"; Flags: ignoreversion\r
\r
-Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
-Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\{#gui_build_dir_name}\release\*"; Excludes: "app.res,vcredist_*.exe,*.cpp,*.h,*.o,*.obj"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+Source: "..\{#gui_build_dir_name}\release\vcredist_x86.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist deleteafterinstall\r
+Source: "..\{#gui_build_dir_name}\release\vcredist_x64.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist deleteafterinstall\r
+Source: "..\..\{#gpsbabel_build_dir_name}\release\gpsbabel.exe"; DestDir: "{app}"; Flags: ignoreversion\r
; Source: release\help\*; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs\r
\r
; Translation strings extracted from source code. Include it in the dist\r
Name: "{commondesktop}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"; Tasks: desktopicon\r
\r
[Run]\r
+Filename: "{app}\vcredist_x86.exe"; Parameters: "/quiet"; Flags: skipifdoesntexist\r
+Filename: "{app}\vcredist_x64.exe"; Parameters: "/quiet"; Flags: skipifdoesntexist\r
Filename: "{app}\gpsbabelfe.exe"; Description: "{cm:LaunchProgram,GPSBabelFE}"; Flags: nowait postinstall skipifsilent\r
\r
[Registry]\r
Root: HKCU; Subkey: "Software\GPSBabel\GPSBabel"; Flags: uninsdeletekey\r
Root: HKCU; Subkey: "Software\GPSBabel\GPSBabelFE"; Flags: uninsdeletekey\r
\r
+; ISPP preprocessor output can be useful for debug\r
+#expr SaveToFile("PreprocessedScript.iss")\r
; Uses the Inno setup compiler.\r
; windeployqt should be run to prepare the necessary Qt files before\r
; running Inno Setup.\r
+#ifndef gui_build_dir_name\r
+ #define gui_build_dir_name "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+#endif\r
+#ifndef gpsbabel_build_dir_name\r
+ #define gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+#endif\r
\r
[Setup]\r
; NOTE: The value of AppId uniquely identifies this application.\r
Source: gmapbase.html; DestDir: "{app}"; Flags: ignoreversion\r
Source: qt.conf; DestDir: "{app}"; Flags: ignoreversion\r
\r
-Source: ..\build-app-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\*; Excludes: "*.cpp,*.o"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
-Source: ..\..\build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release\release\gpsbabel.exe; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\{#gui_build_dir_name}\release\*"; Excludes: "app.res,vcredist_*.exe,*.cpp,*.h,*.o,*.obj"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+Source: "..\{#gui_build_dir_name}\release\vcredist_x86.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist deleteafterinstall\r
+Source: "..\{#gui_build_dir_name}\release\vcredist_x64.exe"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist deleteafterinstall\r
+Source: "..\..\{#gpsbabel_build_dir_name}\release\gpsbabel.exe"; DestDir: "{app}"; Flags: ignoreversion\r
; Source: release\help\*; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs\r
\r
; Translation strings extracted from source code. Include it in the dist\r
Name: "{commondesktop}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"; Tasks: desktopicon\r
\r
[Run]\r
+Filename: "{app}\vcredist_x86.exe"; Parameters: "/quiet"; Flags: skipifdoesntexist\r
+Filename: "{app}\vcredist_x64.exe"; Parameters: "/quiet"; Flags: skipifdoesntexist\r
Filename: "{app}\gpsbabelfe.exe"; Description: "{cm:LaunchProgram,GPSBabelFE}"; Flags: nowait postinstall skipifsilent\r
\r
[Registry]\r
Root: HKCU; Subkey: "Software\GPSBabel\GPSBabel"; Flags: uninsdeletekey\r
Root: HKCU; Subkey: "Software\GPSBabel\GPSBabelFE"; Flags: uninsdeletekey\r
\r
+; ISPP preprocessor output can be useful for debug\r
+#expr SaveToFile("PreprocessedScript.iss")\r
# Run this from a Qt Desktop command window that has the Qt and mingw compiler paths set up,\r
# such as the one Qt Creator will put on the start menu.\r
# For example, to run overriding the default locations of windeployqt and ISSC:\r
-# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -windeployqt "C:\Qt\5.5\mingw492_32\bin\windeployqt.exe" -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"\r
+# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -windeployqt "C:\Qt\5.6.3\mingw49_32\bin\windeployqt.exe" -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"\r
+# Or to do a 64 bit MSVC build with a newer Qt:\r
+# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_3_MSVC2015_64bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_3_MSVC2015_64bit-Release" -mkspec win32-msvc -mkcmd nmake.exe\r
#\r
# Be aware this script is used by appveyor.yml\r
# \r
-# The defaults should be set for appveyor builds.\r
+# The defaults should be compatible with appveyor builds.\r
Param(\r
- $windeployqt = "C:\Qt\5.6\mingw49_32\bin\windeployqt.exe",\r
+ $windeployqt = "windeployqt.exe",\r
$iscc = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe",\r
- $gpsbabel_build_dir_name = "build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release",\r
- $gui_build_dir_name = "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+ $gpsbabel_build_dir_name = "build-GPSBabel-Desktop_Qt_5_5_1_MinGW_32bit-Release",\r
+ $gui_build_dir_name = "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release",\r
+ $mkspec = "win32-g++",\r
+ $mkcmd = "mingw32-make"\r
)\r
# verify we are in the top of the gpsbabel clone\r
Get-Item tools/make_windows_release.ps1 -ErrorAction Stop\r
Remove-Item "$($gpsbabel_build_dir)" -Recurse -ErrorAction Ignore\r
New-Item "$($gpsbabel_build_dir)" -type directory -force\r
Set-Location "$($gpsbabel_build_dir)"\r
-qmake "$($gpsbabel_src_dir)\GPSBabel.pro" -spec win32-g++\r
+qmake "$($gpsbabel_src_dir)\GPSBabel.pro" -spec "$($mkspec)"\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
-mingw32-make qmake_all\r
-mingw32-make\r
+& "$($mkcmd)" qmake_all\r
+& "$($mkcmd)"\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
# copy GPSBabel.exe for use by test_script\r
Remove-Item "$($gpsbabel_src_dir)\release" -Recurse -ErrorAction Ignore\r
Remove-Item "$($gui_build_dir)" -Recurse -ErrorAction Ignore\r
New-Item "$($gui_build_dir)" -type directory -force\r
Set-Location "$($gui_build_dir)"\r
-qmake "$($gpsbabel_src_dir)\gui\app.pro" -spec win32-g++\r
+qmake "$($gpsbabel_src_dir)\gui\app.pro" -spec "$($mkspec)"\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
-mingw32-make qmake_all\r
-mingw32-make\r
+& "$($mkcmd)" qmake_all\r
+& "$($mkcmd)"\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
lupdate "$($gpsbabel_src_dir)\gui\app.pro"\r
lrelease "$($gpsbabel_src_dir)\gui\app.pro"\r
-# windeployqt in 5.5.1 suffers from bug\r
-# https://bugreports.qt.io/browser/QTBUG-48946\r
-# which trashes the translations. Work around\r
-# by using the next version of windeployqt which had this\r
-# bug fixed.\r
# use --plugindir option to locate the plugins.\r
& "$($windeployqt)" --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
Set-Location "$($gpsbabel_src_dir)\gui"\r
-& "$($iscc)" setup.iss\r
+& "$($iscc)" /Dgpsbabel_build_dir_name="$($gpsbabel_build_dir_name)" /Dgui_build_dir_name="$($gui_build_dir_name)" setup.iss\r
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
Set-Location "$($gpsbabel_src_dir)"\r